﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ZealousTTS.Web.ViewModels;
using ZealousTTS.Domain;

namespace ZealousTTS.Web.Utility
{
    public static class ApplicationCache
    {
        //private static List<CategoryViewModel> _categories = null;
        ///// <summary>
        ///// Caches the Categories
        ///// </summary>
        //public static List<CategoryViewModel> Categories
        //{
        //    get
        //    {
        //        if (_categories == null || _categories.Count == 0)
        //        {
        //            RefreshCategoryCache();    
        //        }
        //        return _categories;
        //    }
        //}

        //public static void RefreshCategoryCache()
        //{
        //    ZealousTTSEntities context = new ZealousTTSEntities();
        //    _categories = AutoMapper.Mapper.Map<List<Category>, List<CategoryViewModel>>(context.Categories.ToList());
        //}
    }
}